import IndividualLibCard from '@/pages/User/UserInfo/Component/IndividualLibCard';
import InformationCard from '@/pages/User/UserInfo/Component/InformationCard';
import InformationForm from '@/pages/User/UserInfo/Component/InformationForm';
import React from 'react';

const USERDATA: API.UserInfoProps = {
  user_id: 1,
  user_name: 'hyw',
  user_password: '123****685',
  user_power: 4,
  user_picture: 'https://app.its.csu.edu.cn/fe/upload/default/defaultheadimg.png',
};
const App: React.FC = () => {
  // 状态管理：form表单的开闭
  const [openForm, setOpenForm] = React.useState(false);
  const [userData, setUserData] = React.useState(USERDATA);

  return (
    <>
      <div style={{ width: '100%' }}>
        <InformationCard setOpenForm={setOpenForm} userData={userData} />
        <InformationForm
          openForm={openForm}
          setOpenForm={setOpenForm}
          userData={userData}
          setUserData={setUserData}
        />
        <IndividualLibCard userData={userData}/>
      </div>
    </>
  );
};
export default App;
